home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / tcl / tclmotif.1 / tclmotif / tm.1.2 / wtour / drawingarea1.tcl < prev    next >
Encoding:
Text File  |  1994-01-30  |  465 b   |  22 lines

  1. #
  2. # DrawingArea
  3. #
  4. # for this, we have to do Xlib-style drawing ourselves, which
  5. # should only be done in exposeCallback, and for which we need
  6. # graphics contexts.
  7.  
  8. xmDrawingArea .da managed
  9.  
  10. .da exposeCallback show_text
  11. set gc1 [.da getGC -foreground yellow -background green]
  12. set gc2 [.da getGC -foreground blue -background pink]
  13.  
  14. proc show_text {} {
  15.   global gc1
  16.   global gc2
  17.  
  18.   .da drawImageString $gc1 30 30 "hello"
  19.   .da drawImageString $gc2 30 80 "world"
  20. }
  21.  
  22.